#include <assert.h>
#include <iostream>
#include <SDL.h>
#include "EventPoller.h"
#include "Game.h"
#include "Image.h"
#include "Player.h"
#include "Screen.h"
#include "SplashState.h"
#include "Sprite.h"
#include "SpriteSheet.h"
#include "Timer.h"
#include "Vec2.h"

int main(int, char**)
{
	Screen::Instance()->CreateWindow(1280, 720);

	TheGame::Instance()->SetGameState(TheSplashState::Instance());
	TheGame::Instance()->Run();





/*
	//call the static instance of the screen class which returns pointer to screen
	Screen * theScreen = TheScreen::Instance();
	theScreen->CreateWindow(640, 480);
	
	


	
	Timer* theTimer = TheTimer::Instance();
	int cell = 0;
	Player p;
	p.Load();
	while(true)
	{
		TheTimer::Instance()->Update();
		TheEventPoller::Instance()->Update();

		std::cout << "DT: " << theTimer->GetDT() << "\n";

		bg.Draw(0, 0, theScreen);
		p.Draw();
		p.Update();

		TheScreen::Instance()->Flip();
	}
*/
	SDL_Quit();
	return 0;

}











// 			else if (event.type == SDL_KEYDOWN)
// 			{
// 				//event.key.which.... means you could have two keyboards				
// 				if (event.key.keysym.sym.SDLK_ESCAPE)
// 				{
// 					return 0;
// 				}
// 			}

//changes the game to run at 60fps
//		SDL_Delay(60);


